package org.xxd.kafka.clients.common.network;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xxd.kafka.clients.common.KafkaException;

import java.nio.channels.SelectionKey;
import java.util.Map;

/**
 * @author: XiaoDong.Xie
 * @create: 2020-09-28 09:28
 * @description:
 */
public class PlaintextChannelBuilder implements ChannelBuilder {
    private static final Logger log = LoggerFactory.getLogger(PlaintextChannelBuilder.class);
    private Map<String, ?> configs;


    @Override
    public void configure(Map<String, ?> configs) throws KafkaException {
        try {
            this.configs = configs;
        } catch (Exception e) {
            throw new KafkaException(e);
        }
    }

    @Override
    public KafkaChannel buildChannel(String id, SelectionKey key, int maxReceiveSize) throws KafkaException {
        return null;
    }

    @Override
    public void close() {

    }
}
